home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’96 / O Boy / Source / ObjectSpec_da.cp < prev    next >
Text File  |  1996-06-21  |  851b  |  50 lines

  1. #pragma once on
  2. /*
  3.     ObjectSpec_da.cp
  4.     © Bob Boylan 1996
  5.  
  6.     Revision History
  7.     MacHack 1996    initial creation
  8.  
  9. */
  10. #include "ObjectSpec_da.h"
  11. #include "Helpers_ut.h"
  12.  
  13. //    -----------------------------------------------------------------
  14. //    ctor
  15. //
  16. ObjectSpec_da::ObjectSpec_da()
  17. : _Kind( typeNull ),
  18.   _Pos ( 0 )
  19. {
  20. }
  21. //    ------------------------------------------------
  22. //    ctor ... the way it should be
  23. //
  24. ObjectSpec_da::ObjectSpec_da( DescType inDescType, Int_32 inPosition )
  25. : _Kind( inDescType ),
  26.   _Pos ( inPosition )
  27. {
  28. }
  29. //    ------------------------------------------------
  30. //    dtor
  31. //
  32. ObjectSpec_da::~ObjectSpec_da()
  33. {}
  34.  
  35. //    ------------------------------------------------
  36. //    GetSpecAsString
  37. //
  38. string
  39. ObjectSpec_da::GetSpecAsString()
  40. {
  41.     if( _Kind == typeNull )
  42.     {
  43.         return "'null'()";
  44.     }
  45.     else
  46.     {
  47.         return string("'") + As4CharString(_Kind) + "'";
  48.     }
  49. }
  50.